package com.cn.shop.dao;

import com.cn.shop.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface CommonDao {
    /*注册用户*/
    void register(User user);
    /*查看用户名是否已被注册*/
    int queryUserNameIsExist(String username);
    /*用户登录*/
    int login(@Param("username") String username, @Param("password") String password);
    /*忘记密码*/
    void forget(@Param("newPassword") String newPassword, @Param("changeTimes") int changeTimes, @Param("username") String username);
    /*查询用户改密次数*/
    int queryUserChangePsdTimes(String username);
}
